<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form action="{:url('submitEditActionAction')}" method="post" >
        <input type="hidden" name="action_id" value="{$action.id}">
        <div>操作属性</div>
        <ul>
            <li>
                <label for="table_id">关联表</label>
                <input type="text" id="table_id" name="table_id" value="{$action.table_id}" readonly/>
            </li>
            <li>
                <label for="scene_id">关联场景</label>
                <input type="text" id="scene_id" name="scene_id" value="{$action.scene_id}"/>
            </li>
            <li>
                <label for="name">名称</label>
                <input type="text" id="name" name="name" value="{$action.name}"/>
            </li>
            <li>
                <label for="title">标题</label>
                <input type="text" id="title" name="title" value="{$action.title}"/>
            </li>
            <li>
                <label for="describe">描述</label>
                <input type="text" id="describe" name="describe" value="{$action.describe}"/>
            </li>
            <li>
                <label for="target_type">打开方式</label>
                <select name="target_type" id="target_type">
                    <option value="show" <?php if($action["target_type"]==="show") echo "selected"; ?>>展示</option>
                    <option value="form" <?php if($action["target_type"]==="form") echo "selected"; ?>>表单</option>
                    <option value="post" <?php if($action["target_type"]==="post") echo "selected"; ?>>上传</option>
                    <option value="exec" <?php if($action["target_type"]==="exec") echo "selected"; ?>>执行</option>
                    <option value="relate" <?php if($action["target_type"]==="relate") echo "selected"; ?>>关联</option>
                    <option value="href" <?php if($action["target_type"]==="href") echo "selected"; ?>>链接</option>
                </select>
            </li>
            <li>
                <label for="action_type">操作类型</label>
                <select name="action_type" id="action_type">
                    <option value="create" <?php if($action["action_type"]==="create") echo "selected"; ?>>创建</option>
                    <option value="remove" <?php if($action["action_type"]==="remove") echo "selected"; ?>>删除</option>
                    <option value="update" <?php if($action["action_type"]==="update") echo "selected"; ?>>更新</option>
                    <option value="search" <?php if($action["action_type"]==="search") echo "selected"; ?>>查找</option>
                </select>
            </li>
            <li>
                <label for="data_type">绑定数据</label>
                <select name="data_type" id="data_type">
                    <option value="nope" <?php if($action["data_type"]==="create") echo "selected"; ?>>不绑定</option>
                    <option value="single" <?php if($action["data_type"]==="single") echo "selected"; ?>>单个id</option>
                    <option value="multi" <?php if($action["data_type"]==="multi") echo "selected"; ?>>多个id</option>
                    <option value="where" <?php if($action["data_type"]==="where") echo "selected"; ?>>搜索条件</option>
                </select>
            </li>
            <li>
                <label for="params">参数</label>
                <textarea name="params" id="params" cols="30" rows="10">{$action.params}</textarea>
            </li>
        </ul>
        <button type="submit">提交</button>
    </form>
</body>
</html>
